<template>
  <t-row>
    <t-col :span="12">
      <t-card title="用户" bordered hover-shadow class="card">

        <t-base-table hover stripe bordered tableLayout="auto" row-key="index" :data="data"
          :columns="columns"></t-base-table>

        <template #actions>
          <t-tooltip content="提示信息" showArrow theme="light" placement="mouse">
            <a><t-icon name="info-circle"></t-icon></a>
          </t-tooltip>
        </template>
      </t-card>
    </t-col>
  </t-row>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router';
import { useStatusStore } from '@/stores'
const router = useRouter()
const statusStore = useStatusStore()

import type { TableProps } from 'tdesign-vue-next'
import { ref } from 'vue'
import { log } from 'echarts/types/src/util/log.js';

const columns = ref<TableProps['columns']>([
  { colKey: 'name', title: '用户名' },
  { colKey: 'uid', title: '用户UID' },
  { colKey: 'gid', title: '用户组标识符(GID)' },
  { colKey: 'gecos', title: '用户注释' },
  { colKey: 'home', title: '用户家目录' },
  { colKey: 'shell', title: '默认命令行解释器' },
])



const data = ref<TableProps['data']>([
  {
    "name": "root",
    "uid": 0,
    "gid": 0,
    "gecos": "root",
    "home": "/root",
    "shell": "/bin/bash"
  },
  {
    "name": "daemon",
    "uid": 1,
    "gid": 1,
    "gecos": "daemon",
    "home": "/usr/sbin",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "bin",
    "uid": 2,
    "gid": 2,
    "gecos": "bin",
    "home": "/bin",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "sys",
    "uid": 3,
    "gid": 3,
    "gecos": "sys",
    "home": "/dev",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "sync",
    "uid": 4,
    "gid": 65534,
    "gecos": "sync",
    "home": "/bin",
    "shell": "/bin/sync"
  },
  {
    "name": "games",
    "uid": 5,
    "gid": 60,
    "gecos": "games",
    "home": "/usr/games",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "man",
    "uid": 6,
    "gid": 12,
    "gecos": "man",
    "home": "/var/cache/man",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "lp",
    "uid": 7,
    "gid": 7,
    "gecos": "lp",
    "home": "/var/spool/lpd",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "mail",
    "uid": 8,
    "gid": 8,
    "gecos": "mail",
    "home": "/var/mail",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "news",
    "uid": 9,
    "gid": 9,
    "gecos": "news",
    "home": "/var/spool/news",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "uucp",
    "uid": 10,
    "gid": 10,
    "gecos": "uucp",
    "home": "/var/spool/uucp",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "proxy",
    "uid": 13,
    "gid": 13,
    "gecos": "proxy",
    "home": "/bin",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "www-data",
    "uid": 33,
    "gid": 33,
    "gecos": "www-data",
    "home": "/var/www",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "backup",
    "uid": 34,
    "gid": 34,
    "gecos": "backup",
    "home": "/var/backups",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "list",
    "uid": 38,
    "gid": 38,
    "gecos": "Mailing List Manager",
    "home": "/var/list",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "irc",
    "uid": 39,
    "gid": 39,
    "gecos": "ircd",
    "home": "/run/ircd",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "_apt",
    "uid": 42,
    "gid": 65534,
    "gecos": "",
    "home": "/nonexistent",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "nobody",
    "uid": 65534,
    "gid": 65534,
    "gecos": "nobody",
    "home": "/nonexistent",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "systemd-network",
    "uid": 998,
    "gid": 998,
    "gecos": "systemd Network Management",
    "home": "/",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "usbmux",
    "uid": 100,
    "gid": 46,
    "gecos": "usbmux daemon,,,",
    "home": "/var/lib/usbmux",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "systemd-timesync",
    "uid": 997,
    "gid": 997,
    "gecos": "systemd Time Synchronization",
    "home": "/",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "dhcpcd",
    "uid": 101,
    "gid": 65534,
    "gecos": "DHCP Client Daemon,,,",
    "home": "/usr/lib/dhcpcd",
    "shell": "/bin/false"
  },
  {
    "name": "messagebus",
    "uid": 102,
    "gid": 102,
    "gecos": "",
    "home": "/nonexistent",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "systemd-resolve",
    "uid": 992,
    "gid": 992,
    "gecos": "systemd Resolver",
    "home": "/",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "pollinate",
    "uid": 103,
    "gid": 1,
    "gecos": "",
    "home": "/var/cache/pollinate",
    "shell": "/bin/false"
  },
  {
    "name": "polkitd",
    "uid": 991,
    "gid": 991,
    "gecos": "User for polkitd",
    "home": "/",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "syslog",
    "uid": 104,
    "gid": 104,
    "gecos": "",
    "home": "/nonexistent",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "uuidd",
    "uid": 105,
    "gid": 105,
    "gecos": "",
    "home": "/run/uuidd",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "tcpdump",
    "uid": 106,
    "gid": 107,
    "gecos": "",
    "home": "/nonexistent",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "tss",
    "uid": 107,
    "gid": 108,
    "gecos": "TPM software stack,,,",
    "home": "/var/lib/tpm",
    "shell": "/bin/false"
  },
  {
    "name": "landscape",
    "uid": 108,
    "gid": 109,
    "gecos": "",
    "home": "/var/lib/landscape",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "fwupd-refresh",
    "uid": 989,
    "gid": 989,
    "gecos": "Firmware update daemon",
    "home": "/var/lib/fwupd",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "sshd",
    "uid": 109,
    "gid": 65534,
    "gecos": "",
    "home": "/run/sshd",
    "shell": "/usr/sbin/nologin"
  },
  {
    "name": "starsac",
    "uid": 1000,
    "gid": 1000,
    "gecos": "starsac",
    "home": "/home/starsac",
    "shell": "/bin/bash"
  }
])

console.log(data.value?.length)


</script>

<style scoped></style>